\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{yglang}[2005/09/12 v0.5]
%\RequirePackage{xspace}

\newcommand{\@pl}[1]{\mbox{\textsc{#1}}} %\xspace
\newcommand\lang[1]{\@pl{#1}}

\newcommand{\Java}{\@pl{Java}}  %\Java{}~\cite{Arnold:Gosling:96}
\newcommand{\CC}{\@pl{C++}\xspace}
\newcommand{\Javari}{\@pl{Javari}}
\newcommand{\Eiffel}{\@pl{Eiffel}}  %\Eiffel~\cite{Meyer:92}
\newcommand{\Smalltalk}{\@pl{Smalltalk}}  %\Smalltalk~\cite{Goldberg:Book:84}
\newcommand{\ObjectiveC}{\@pl{Objective-C}}  %\ObjectiveC~\cite{Cox:Book:Evolutionary:86}
\newcommand{\Cecil}{\@pl{Cecil}} %\Cecil
\newcommand{\Dylan}{\@pl{Dylan}} %\Dylan~\cite{Dylan}
\newcommand{\CommonLoops}{\@pl{CommonLoops}} %\CommonLoops~\cite{CommonLoops}
\newcommand{\PolyGlot}{\@pl{PolyGlot}} %\PolyGlot~\cite{PolyGlot}
\newcommand{\CLOS}{\@pl{CLOS}} %\CLOS~\cite{CLOS}
\newcommand{\Kea}{\@pl{Kea}} %\Kea~\cite{Kea}
\newcommand\AspectJ{@pl{AspectJ}} %\cite{Kiczales:2001}
\newcommand\NextGen{\@pl{LANG{NextGen}}} %~\cite{Allen:Bannet:Cartwright:03}
\newcommand\Prolog{\lang{Prolog}}
\newcommand\Datalog{\lang{Datalog}}
\newcommand\SQL{\lang{SQL}}
\newcommand\Self{\@pl{LANG{Self}}} %~\cite{Ungar:Smith:87}
\newcommand\Tcl{\@pl{LANG{Tcl}}}
\newcommand\XQuery{\@pl{LANG{XQuery}}}

\newcommand\NonCitingUseX[1]{\csname nocite#1\endcsname}
\newcommand\NonCitingUse[1]{\NonCitingUseX{#1}} %\xspace
\newcommand\@IgnoreLanguageCitation[1]{%
    \expandafter\gdef\csname#1\endcsname{\csname nocite#1\endcsname}%
}
\newcommand\StopLanguageCitation[1]{%
    \expandafter\gdef\csname#1\endcsname{\csname nocite#1\endcsname}%\xspace
}


\def\@LANG#1#2#3{%
    \expandafter\gdef\csname nocite#1\endcsname{#3}% Define the base version, as e.g., \nociteJava
}



\newcommand\NewLanguageCitation[2]{\@LANG{#1}{\textup{#2}}{\textsc{#1}}}
\newcommand\NewLangaugeCitationSpecial[3]{\@LANG{#1}{#2}{#3}}


%Use alphabetical ordering
\NewLanguageCitation{Ada}{\cite{Tucker:97}}
\NewLangaugeCitationSpecial{AJEE}{\cite{Cohen:Gil:04}}{\textsc{AspectJ2EE}}
\NewLanguageCitation{AspectJ}{\cite{Kiczales:2001}}
\NewLanguageCitation{AWK}{\cite{Aho:Kernighan:Weinberger:Book:88}}
% \NewLangaugeCitationSpecial{CC}{}{\mbox{C++}}%\xspace  \cite{Stroustrup:Book:97}
% \NewLangaugeCitation{CC}{\mbox{C++}}%\xspace  \cite{Stroustrup:Book:97}
\NewLanguageCitation{Cecil}{\cite{Chambers:Cecil:93}}
\NewLanguageCitation{CLOS}{\cite{CLOS}}
\NewLanguageCitation{Cobol}{}
\NewLanguageCitation{CommonLoops}{\cite{CommonLoops:Bobrow:Kahn:Kiczales:Masinter:Stefik:Zdybel:86}}
\NewLangaugeCitationSpecial{CProlog}{\cite{Shapiro:87}}{\textsc{Concurrent Prolog}}
\NewLanguageCitation{Datalog}{\cite{Ceri:Gottlob:Tanca:90}}
\NewLanguageCitation{Dylan}{\cite{Dylan:Shalit:97}}
% \NewLanguageCitation{Eiffel}{}  %\cite{Meyer:92}
\NewLanguageCitation{Fortran}{}
\NewLanguageCitation{Flavors}{\cite{Moon:Flavors:86}}
\NewLanguageCitation{Java}{}   %\cite{Arnold:Gosling:96}
\NewLanguageCitation{Javari}{\cite{TschantzE2005}}
\NewLanguageCitation{Kea}{\cite{Kea}}
\NewLanguageCitation{MixGen}{\cite{Allen:Bannet:Cartwright:03}}
\NewLanguageCitation{Modula}{\cite{Reiser:Wirth:92}}
\NewLanguageCitation{ML}{\cite{ml-spec:Milner:Tofte:Harper:MacQueen:97}}
\NewLanguageCitation{NextGen}{\cite{Allen:Bannet:Cartwright:03}}
\NewLanguageCitation{Pascal}{\cite{Wirth:71}}
\NewLanguageCitation{PolyGlot}{\cite{PolyGlot}}
\NewLanguageCitation{ObjectiveC}{\cite{Cox:Book:Evolutionary:86}}
\NewLanguageCitation{Prolog}{\cite{Deransart:Cervoni:Ed-Dbali:96}}
\NewLanguageCitation{Scala}{\cite{Odersky:Altherr:Cremet:Emir:Maneth:Micheloud:Mihaylov:Schinz:Stenman:Zenger:04}}
\NewLanguageCitation{SQL}{\cite{SQL}}
\NewLanguageCitation{Self}{\cite{Ungar:Smith:87}}
\NewLanguageCitation{Smalltalk}{\cite{Goldberg:Book:84}}
\NewLanguageCitation{TCL}{\cite{Ousterhout:90}}
\NewLangaugeCitationSpecial{THETA}{\cite{Liskov:al:95}}{\lang{Theta}}
\NewLanguageCitation{XQuery}{\cite{XQuery}}
